package com.atguigu.ware.wares.dao;

import com.atguigu.common.to.es.SkuHasStock;
import com.atguigu.ware.wares.entity.WmsWareOrderTaskDetailEntity;
import com.atguigu.ware.wares.entity.WmsWareSkuEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 商品库存
 * 
 * @author qhw
 * @email qhw@gmail.com
 * @date 2021-08-03 19:16:41
 */
@Mapper
public interface WmsWareSkuDao extends BaseMapper<WmsWareSkuEntity> {

    void updateBySkuIdAndWareId(@Param("skuId") Long skuId, @Param("wareId") Long wareId, @Param("skuNum") Integer skuNum);

    List<SkuHasStock> skuIdInfo(@Param("skuIds") List<Long> skuIds);

    void deblocking(@Param("lock") WmsWareOrderTaskDetailEntity entity);
}
